﻿@using Weapsy.Reporting.Apps
@model IEnumerable<Weapsy.Reporting.Apps.ModuleTypeAdminListModel>

@{
    ViewBag.Title = "Module Types";
}

@section scripts{
    <script src="~/lib/Sortable/Sortable.js"></script>
    <script src="~/js/admin/moduleTypes/index.js"></script>
}

<div class="page-header">
    <h1>Module Types</h1>
</div>

<table class="table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <th>Name</th>
            <th>Title</th>
            <th>Description</th>
            <th class="text-center">&nbsp;</th>
        </tr>
    </thead>
    <tbody>
    @foreach (var moduleType in Model)
    {
        <tr>
            <td>@moduleType.Name</td>
            <td>@moduleType.Title</td>
            <td>@moduleType.Description</td>
            <td class="text-center">
                <a href="/admin/moduleType/edit/@moduleType.Id" class="glyphicon glyphicon-edit options" title="Edit"></a>
                <a href="#" class="glyphicon glyphicon-remove options delete-moduleType" data-toggle="modal" data-target="#confirm-delete" data-id="@moduleType.Id" title="Delete"></a>
            </td>
        </tr>
    }
    </tbody>
</table>

<div>
    <a href="@Url.Action("Create", "ModuleType", new { area = "Admin" })" class="btn btn-primary" title="New ModuleType">New ModuleType</a>
</div>

@await Html.PartialAsync("_ConfirmDelete")